﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
namespace Facebook2.WebUI
{
    public partial class SiteMaster : System.Web.UI.MasterPage
    {
        public string webServiceName;

        void Page_PreInit(Object sender, EventArgs e)
        {
            EnvironmentInit();
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            EnvironmentInit();
        }

        private void EnvironmentInit()
        {
            string env = ConfigurationManager.AppSettings["Environment"].ToString();

            switch (env)
            {
                case "dev":
                    this.webServiceName = "Service_Dev";
                    break;
                case "prod":
                    this.webServiceName = "Service_Prod";
                    break;
            }
        }
    }
}